package com.yuezhu.constomview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;

import com.yuezhu.R;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by zhao on 2016/5/4.
 */
public class AddApartMentView extends LinearLayout {

    @InjectView(R.id.add_apartment1)
    TextBlankView addApartment1;
    @InjectView(R.id.add_apartment2)
    TextBlankView addApartment2;
    @InjectView(R.id.add_apartment3)
    TextBlankView addApartment3;
    @InjectView(R.id.add_apartment4)
    TextBlankView addApartment4;
    @InjectView(R.id.add_apartment5)
    TextBlankView addApartment5;
    @InjectView(R.id.add_apartment6)
    TextBlankView addApartment6;
    @InjectView(R.id.add_apartment7)
    TextBlankView addApartment7;

    public AddApartMentView(Context context) {
        super(context);
        initView(context);
    }

    public AddApartMentView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public AddApartMentView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        initView(context);
    }

    private void initView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.layout_addpartment_view, this);
        ButterKnife.inject(this, view);
        /*addApartment1 = (TextBlankView) view.findViewById(R.id.add_apartment1);
        addApartment2 = (TextBlankView) view.findViewById(R.id.add_apartment2);
        addApartment3 = (TextBlankView) view.findViewById(R.id.add_apartment3);
        addApartment4 = (TextBlankView) view.findViewById(R.id.add_apartment4);
        addApartment5 = (TextBlankView) view.findViewById(R.id.add_apartment5);
        addApartment6 = (TextBlankView) view.findViewById(R.id.add_apartment6);
        addApartment7 = (TextBlankView) view.findViewById(R.id.add_apartment7);*/
        setData();
    }

    public void setData() {
        addApartment1.setContent("公寓名称   ");
        addApartment2.setContent("地址         ");
        addApartment3.setContent("详细地址   ");
        addApartment4.setContent("联系人       ");
        addApartment5.setContent("联系方式   ");
        addApartment6.setContent("楼层数       ");
        addApartment7.setContent("每层房间数 ");
    }
}
